import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/Login'
    // redirect: '/Home/DynamicList'
    // redirect: '/Home'
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import( /* webpackChunkName: "Login" */  '../views/Login'),
  },
  {
    path: '/ForgetPassword',
    name: 'ForgetPassword',
    component: () => import( /* webpackChunkName: "Login" */  '../views/ForgetPassword'),

  },
  {
    path: '/Next',
    name: 'Next',
    component: () => import( /* webpackChunkName: "Login" */  '../views/Next'),

  },
  {
    path: '/Home',
    name: 'Home',
    component: Home,
    children: [
      {
        path: 'DynamicList',
        name: 'DynamicList',
        component: () => import( /* webpackChunkName: "DynamicList" */  '../views/contain/DynamicList'),

      },
      {
        path: 'vodiodeal',
        name: 'vodiodeal',
        component: () => import( /* webpackChunkName: "vodiodeal" */  '../views/contain/vodiodeal')
      },
      //广播列表
      {
        path: 'RadioList',
        name: 'RadioList',
        component: () => import( /* webpackChunkName: "RadioList" */  '../views/contain/radio/RadioList')
      },
      // 添加广播
      {
        path: 'Addradio',
        name: 'Addradio',
        component: () => import( /* webpackChunkName: "Addradio" */  '../views/contain/radio/Addradio')
      },

      { 
        path: 'BroadcastType',
        name: 'BroadcastType',
        component: () => import( /* webpackChunkName: "BroadcastType" */  '../views/contain/BroadcastType')
      },
      { //广播详情
        path: 'RadioDetails',
        name: 'RadioDetails',
        component: () => import( /* webpackChunkName: "RadioDetails" */  '../views/contain/radio/RadioDetails')
      },
      {
        //评论列表
        path: 'CommentList',
        name: 'CommentList',
        component: () => import( /* webpackChunkName: "CommentList" */  '../views/contain/CommentList')
      },
      {
        //直播列表
        path: 'LiveList',
        name: 'LiveList',
        component: () => import( /* webpackChunkName: "LiveList" */  '../views/contain/LiveList')
      },
      {
        //活动列表
        path: 'ActivityList',
        name: 'ActivityList',
        component: () => import( /* webpackChunkName: "ActivityList" */  '../views/contain/ActivityList'),

      },
       //查看活动列表详情
       {
        path: 'ActiveDeail',
        name: 'ActiveDeail',
        component: () => import( /* webpackChunkName: "CouponCancellate" */  '../views/contain/ActiveDeail'),

      },
       //查看评委详情
       {
        path: 'JudgeDeail',
        name: 'JudgeDeail',
        component: () => import( /* webpackChunkName: "CouponCancellate" */  '../views/contain/JudgeDeail'),

      },
       //查看活动列表详情评委
       {
        path: 'Judge',
        name: 'Judge',
        component: () => import( /* webpackChunkName: "CouponCancellate" */  '../views/contain/Judge'),

      },
      {
        path: 'AddActive',
        name: 'AddActive',
        component: () => import( /* webpackChunkName: "AddActive" */  '../views/contain/AddActive'),
      },
      {
        path: 'UserAdmin',
        name: 'UserAdmin',
        component: () => import( /* webpackChunkName: "UserAdmin" */  '../views/contain/UserAdmin'),
      },
      //用户马甲列表--用户管理员
      {
        path: 'AddUser',
        name: 'AddUser',
        component: () => import( /* webpackChunkName: "AddUser" */  '../views/contain/AddUser'),
      },
      {
        path: 'Publish',
        name: 'Publish',
        component: () => import( /* webpackChunkName: "Publish" */  '../views/contain/Publish'),
      },
      {
        path: 'CheckUser',
        name: 'CheckUser',
        component: () => import( /* webpackChunkName: "CheckUser" */  '../views/contain/CheckUser'),
      },
      //马甲用户列表
      {
        path: 'UserList',
        name: 'UserList',
        component: () => import( /* webpackChunkName: "UserList" */  '../views/contain/UserList'),

      },
      //用户列表
      {
        path: 'User',
        name: 'User',
        component: () => import( /* webpackChunkName: "User" */  '../views/contain/User'),

      },
      //普通用户
      {
        path: 'NormalUser',
        name: 'NormalUser',
        component: () => import( /* webpackChunkName: "NormalUser" */  '../views/contain/NormalUser'),

      },
      //  认证审核
      {
        path: 'Audit',
        name: 'Audit',
        component: () => import( /* webpackChunkName: "Audit" */  '../views/contain/Audit'),

      },

      {
        path: 'OperationLog',
        name: 'OperationLog',
        component: () => import( /* webpackChunkName: "Audit" */  '../views/contain/operation-log/OperationLog'),

      },
      //  审核通过
      {
        path: 'CheakAudit',
        name: 'CheakAudit',
        component: () => import( /* webpackChunkName: "CheakAudit" */  '../views/contain/CheakAudit'),

      },
      //个人中心
      {
        path: 'Profile',
        name: 'Profile',
        component: () => import( /* webpackChunkName: "rights-manage" */  '../views/contain/rights-manage/Profile'),

      },
      // 角色列表
      {
        path: 'RoleList',
        name: 'RoleList',
        component: () => import( /* webpackChunkName: "rights-manage" */  '../views/contain/rights-manage/RoleList'),

      },
      // 角色详情
      {
        path: 'RoleInfo',
        name: 'RoleInfo',
        component: () => import( /* webpackChunkName: "rights-manage" */  '../views/contain/rights-manage/RoleInfo'),

      },
      //  审核通过
      {
        path: 'CheakAudit',
        name: 'CheakAudit',
        component: () => import( /* webpackChunkName: "CheakAudit" */  '../views/contain/CheakAudit'),

      },
      //  订单管理 活动
      {
        path: 'Order',
        name: 'Order',
        component: () => import( /* webpackChunkName: "Order" */  '../views/contain/Order'),

      },
      //  订单管理 商城
      {
        path: 'Mallorders',
        name: 'Mallorders',
        component: () => import( /* webpackChunkName: "Mallorders" */  '../views/contain/Mallorders'),

      },
      //  商城管理 列表
      {
        path: 'StoreList',
        name: 'StoreList',
        component: () => import( /* webpackChunkName: "StoreList" */  '../views/contain/store/StoreList'),

      },
      //  商城管理 查看详情
      {
        path: 'CheckStore',
        name: 'CheckStore',
        component: () => import( /* webpackChunkName: "CheckStore" */  '../views/contain/store/CheckStore'),

      },
      //  消息管理 消息推送
      {
        path: 'Msgpush',
        name: 'Msgpush',
        component: () => import( /* webpackChunkName: "Msgpush" */  '../views/contain/Msgpush'),

      },
      //财务管理 
      // 财务列表
      {
        path: 'FinancialList',
        name: 'FinancialList',
        component: () => import( /* webpackChunkName: "FinancialList" */  '../views/contain/financial/FinancialList'),

      },
      //提现列表 
      {
        path: 'WithdrawList',
        name: 'WithdrawList',
        component: () => import( /* webpackChunkName: "" */  '../views/contain/financial/WithdrawList'),

      },
      //banner管理
      {
        path: 'Banner',
        name: 'Banner',
        component: () => import( /* webpackChunkName: "Banner" */  '../views/contain/Banner'),

      },
      // 新建banner
      {
        path: 'AddBanner',
        name: 'AddBanner',
        component: () => import( /* webpackChunkName: "AddBanner" */  '../views/contain/AddBanner'),

      },
      // 查看banner
      {
        path: 'CheckoutBanner',
        name: 'CheckoutBanner',
        component: () => import( /* webpackChunkName: "CheckoutBanner" */  '../views/contain/CheckoutBanner'),

      },
      // 举报
      {
        path: 'Report',
        name: 'Report',
        component: () => import( /* webpackChunkName: "Report" */  '../views/contain/report/Report'),

      },
      // 举报 查看
      {
        path: 'CheckReport',
        name: 'CheckReport',
        component: () => import( /* webpackChunkName: "CheckReport" */  '../views/contain/report/CheckReport'),

      },
      // 员工列表
      {
        path: 'EmployeesList',
        name: 'EmployeesList',
        component: () => import( /* webpackChunkName: "rights-manage" */  '../views/contain/rights-manage/EmployeesList'),

      },

      // 员工信息
      {
        path: 'EmployeesInfo',
        name: 'EmployeesInfo',
        component: () => import( /* webpackChunkName: "rights-manage" */  '../views/contain/rights-manage/EmployeesInfo'),

      },
      // 广告列表
      {
        path: 'AdvertisingList',
        name: 'AdvertisingList',
        component: () => import( /* webpackChunkName: "advertising" */  '../views/contain/advertising/AdvertisingList'),

      },

      {
        path: 'AdvertisingInfo',
        name: 'AdvertisingInfo',
        component: () => import( /* webpackChunkName: "advertising" */  '../views/contain/advertising/AdvertisingInfo'),

      },
      // 问题列表
      {
        path: 'ProblemList',
        name: 'ProblemList',
        component: () => import( /* webpackChunkName: "problem-feedback" */  '../views/contain/problem-feedback/ProblemList'),

      },
      // 问题详情
      {
        path: 'ProblemInfo',
        name: 'ProblemInfo',
        component: () => import( /* webpackChunkName: "problem-feedback" */  '../views/contain/problem-feedback/ProblemInfo'),

      },
      // 分享模板
      {
        path: 'ShareSetting',
        name: 'ShareSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/ShareSetting'),

      },
      // 礼物设置
      {
        path: 'GiftSetting',
        name: 'GiftSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/GiftSetting'),

      },
      // 任务设置
      {
        path: 'TaskSetting',
        name: 'TaskSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/TaskSetting'),

      },

      // 举报类型管理
      {
        path: 'ReportTypeManage',
        name: 'ReportTypeManage',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/ReportTypeManage'),

      },

      // 问题类型管理
      {
        path: 'QuestionTypeManage',
        name: 'QuestionTypeManage',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/QuestionTypeManage'),

      },

      // 热搜设置
      {
        path: 'HotSearchSetting',
        name: 'HotSearchSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/HotSearchSetting'),

      },

      // 充值套餐设置
      {
        path: 'RechargeSetting',
        name: 'RechargeSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/RechargeSetting'),

      },
      // 启动页设置
      {
        path: 'StartPageSetting',
        name: 'StartPageSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/StartPageSetting'),

      },
      // 分类标签设置

      {
        path: 'LabelSetting',
        name: 'LabelSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/LabelSetting'),

      },

      // 商城分类标签设置

      {
        path: 'MallLabelSetting',
        name: 'MallLabelSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/MallLabelSetting'),

      },
      // 广播标签设置
      {
        path: 'RadioLabelSetting',
        name: 'RadioLabelSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/RadioLabelSetting'),

      },
      // 签到设置
      {
        path: 'SignInSetting',
        name: 'SignInSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/SignInSetting'),

      },
      // 其他设置
      {
        path: 'OtherSetting',
        name: 'OtherSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/OtherSetting'),

      },
      // 用户协议
      {
        path: 'UserAgreement',
        name: 'UserAgreement',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/UserAgreement'),

      },
      // 隐私政策
      {
        path: 'PrivacyPolicy',
        name: 'PrivacyPolicy',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/PrivacyPolicy'),

      },
      // 版本管理
      {
        path: 'VersionSetting',
        name: 'VersionSetting',
        component: () => import( /* webpackChunkName: "setting" */  '../views/contain/setting/VersionSetting'),

      },
      // 优惠券核销
      {
        path: 'CouponCancellate',
        name: 'CouponCancellate',
        component: () => import( /* webpackChunkName: "CouponCancellate" */  '../views/contain/coupon-cancellate/CouponCancellate'),
      },
      // 核销记录
      {
        path: 'CancellateRecord',
        name: 'CancellateRecord',
        component: () => import( /* webpackChunkName: "CouponCancellate" */  '../views/contain/coupon-cancellate/CancellateRecord'),

      },
     

    ]
  },

]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})
// router.beforeEach((to, from, next) => {
//   if (to.path != '/Login') {
//     if (!localStorage.getItem('mtoken')) {
//       next('/Login')
//     } else {
//       next()
//     }
//   } else {
//     next()
//   }
// })
export default router
